package com.yanqu.road.server.timer.activity;

import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.yqhotel.YqHotelModule;
import com.yanqu.road.server.manger.player.GamePlayerMgr;
import com.yanqu.road.utils.executor.GeneralTask;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.List;

//同步在线的玩家且在界面的小人生成情况
public class YqHotelSyncNpcTask extends GeneralTask {

    private Logger logger = LogManager.getLogger(this.getClass().getName());

    @Override
    public void doRun() {
        List<GamePlayer> playerList = GamePlayerMgr.getCopyPlayerList();
        for (GamePlayer player : playerList) {
            player.getModule(YqHotelModule.class).timerSyncStudent();
            player.getModule(YqHotelModule.class).timerEventMake(true);
        }
    }
}
